import React from 'react';
import { Cascader } from 'antd';
import type { CascaderProps } from 'antd/lib/cascader';
import { nestedCityCode } from '@/components/CityCode/citycode';

const CityCascader: React.FC<Omit<Omit<CascaderProps<any>, 'fieldNames'>, 'options'>> = props => (
  <Cascader
    { ...props }
    fieldNames={ { label: 'name', value: 'code', children: 'children' } }
    options={ nestedCityCode }

  />
);

export default CityCascader;
